-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Expand and enhance moddable sidebar #47620
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 tasks
ZhilkinSerg
added
Info / User Interface
Game - player communication, menus, etc.
0.F Feature Freeze
<Enhancement / Feature>
New features, or enhancements on existing
labels
Feb 20, 2021
widget_var for linking avatar attributes to widgets: - focus, move, pain, speed, stamina, stats, HP per bodypart and more widget class to render avatar variables in UI with labels and layout: - uses generic_factory to load JSON from widget types - JSON: id, label, style, var, colors, symbols, width, fill, etc. - show() to render widget value from avatar instance - layout() to arrange widgets and do max width padding/alignment - get_var_value() to return avatar's current "var" value - color_value_string() to render value with colors - supporting: value_color(), value_string(), graph(), num()
Build on the data-driven sidebar `widget` class, defining a collection of numeric and graph display elements, including familiar as well as new informational displays: - HP bar graphs for each body part, in familiar `|||||` form - Classic and extended (10-character) stamina graph - Numeric indicators for sound, focus, pain, moves, str, dex, int, per - Encumbrance bar graphs for each body part - Warmth numbers for each body part - Hunger, thirst, and pain phrases
Add a "Data Drive Sidebar Demo" section that can be toggled on for each sidebar layout (classic/labels and narrow/compact), loading from the "root_layout" widget.
widget_var for linking avatar attributes to widgets: - focus, move, pain, speed, stamina, stats, HP per bodypart and more widget class to render avatar variables in UI with labels and layout: - uses generic_factory to load JSON from widget types - JSON: id, label, style, var, colors, symbols, width, fill, etc. - show() to render widget value from avatar instance - layout() to arrange widgets and do max width padding/alignment - get_var_value() to return avatar's current "var" value - color_value_string() to render value with colors - supporting: value_color(), value_string(), graph(), num() src/widget.cpp Use get_focus
pain, hunger, thirst, and fatigue descriptions now available to modular widgets
Gives cleaner-looking results, especially when value is empty
wapcaplet
force-pushed
the
w-sidebar-json-2
branch
from
February 21, 2021 04:13
4fc0875
to
c2c49e8
Compare
Closing. This branch has grown to include a bunch of random stuff (and my local one has even more). I am in the process of rebasing and will submit some smaller, cleaner PRs to follow up. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
<Enhancement / Feature>
New features, or enhancements on existing
Info / User Interface
Game - player communication, menus, etc.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Feature "Expand and enhance moddable sidebar"
Purpose of change
This PR will be aimed toward converting and implementing most (if not all) of the remaining sidebar elements as data-driven widgets.
Describe the solution
To do
Describe alternatives you've considered
Making it up as I go along
Testing
In progress
Additional context
Depends on #44683 and is a continuation of it